/*
 * tbooleanobject.h
 *
 *  Created on: Oct 27, 2009
 *      Author: price
 */

#ifndef BOOLEANOBJECT_H_
#define BOOLEANOBJECT_H_

#include "templateobject.h"

namespace templatipus
{

	class TBooleanObject: public TemplateObject
	{
public:

		TBooleanObject();
		TBooleanObject(const TemplateObject &other);
		TBooleanObject(const tbool &rhs);
		TBooleanObject(const int8 &rhs);
		TBooleanObject(const int16 &rhs);
		TBooleanObject(const int32 &rhs);
		TBooleanObject(const int64 &rhs);
		TBooleanObject(const float32 &rhs);
		TBooleanObject(const float64 &rhs);
		TBooleanObject(const std::wstring& rhs);
		TBooleanObject(const std::string& rhs);
		TBooleanObject(const unicodePtr rhs);
		TBooleanObject(const utf8Ptr rhs);

		virtual ~TBooleanObject();

		//assigning values
		virtual TemplateObject& operator=(const TemplateObject &other);
		virtual TemplateObject& operator=(const int8 &other);
		virtual TemplateObject& operator=(const int16 &other);
		virtual TemplateObject& operator=(const int32 &other);
		virtual TemplateObject& operator=(const int64 &other);
		virtual TemplateObject& operator=(const float32 &other);
		virtual TemplateObject& operator=(const float64 &other);
		virtual TemplateObject& operator=(const std::wstring& other);
		virtual TemplateObject& operator=(const std::string& other);
		virtual TemplateObject& operator=(const utf8Ptr other);
		virtual TemplateObject& operator=(const unicodePtr other);

		//comparison
		virtual tbool operator ==(const TemplateObject &other) const;
		virtual tbool operator !=(const TemplateObject &other) const;

		virtual tbool operator &&(const TemplateObject &other) const;
		virtual tbool operator ||(const TemplateObject &other) const;

		//String stuff
		virtual operator std::string() const;
		virtual operator std::wstring() const;

		//Conversion operators

		virtual operator tbool() const;
		virtual operator int8() const;
		virtual operator uint8() const;
		virtual operator int16() const;
		virtual operator uint16() const;
		virtual operator int32() const;
		virtual operator uint32() const;
		virtual operator int64() const;
		virtual operator uint64() const;
		virtual operator float32() const;
		virtual operator float64() const;

		virtual TemplateObject * newInstance() const
		{
			return new TBooleanObject();
		}

protected:
		tbool internalValue;
		utf8c retUtf8[10];
		unicodec retUnicode[10];

	};



}

#endif /* BOOLEANOBJECT_H_ */
